{yun:}include file="$comstyle/header.htm"{/yun}
<div class="w1000">
	<div class="admin_mainbody"> 
		{yun:}include file="$comstyle/left.htm"{/yun}
		<div class=right_box>
			<div class=admincont_box>
				<div class="com_tit"><span class="com_tit_span">充值赏金</span></div>
				
				<div class="com_body">
					<div class="admin_new_tip ">
						<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>温馨提示</div>
						<div class="admin_new_tip_list_cont">
							<div class="admin_new_tip_list"> 
								当前赏金兑换比例为1RMB=1赏金
							</div>
						</div>
					</div>
			  
					<iframe id="fdingdan"  name="fdingdan" onload="returnmessage('fdingdan');" style="display:none"></iframe>
					<form id="alipayment" name="alipayment" target="fdingdan" action="index.php?c=pay&act=dingdan" method="post">
						<input type="hidden" id="logid" name="logid" />
						<input type="hidden" id="integral" name="price_int" value="{yun:}$integralclass_name[$integralclass_index[0]]{/yun}" />
						<input type="hidden" id="integralid" name="integralid" data-discount="{yun:}$integralclass_discount[$integralclass_index[0]]{/yun}" value="{yun:}$integralclass_index[0]{/yun}" />
						<div class="payment_list">
							<div class="payment_list_s mt10">充值数量：</div>
							<div class="payment_list_r">

								<div class="payment_list_zdy" style="margin-top: 10px;">
									<input type="text" id="autointegral" onBlur="comautointegral();" class="payment_list_input"placeholder="自定义" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" maxlength='6'/>赏金
								</div>
							</div>
							<div class="payment_list">
								<div class="payment_list_s" style="line-height:40px;">金额：</div>
								<div class="payment_list_r">
									<span class="payintegral" id="payintegral">0</span>元
									<input type="hidden" name="price" size="10"  id="user_vip_price">
								</div>
							</div>
							<div class="payment_list" style="display: none;">
								<div class="payment_list_s" style="line-height:92px;">支付备注：</div>
								<div class="payment_list_r">
									<textarea name="remark" id="remark" cols="40" class="payment_list_textarea"></textarea>
								</div>
							</div>
							<div class="payment_list coupon">
								<div class="payment_list_s">&nbsp;</div>
								<div class="payment_list_r">
									<input type="submit" name="submit" class="payment_list_other" value="提交订单">
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>

<div id="remind_order" style="display:none; width:320px;">
	<div class="pay_tip_box" >
		<div class="pay_tip_top" >
			<div class="pay_tip_box_ts">温馨提示</div>
			您有 <font color="#FF3300">{yun:}$nopayorder{/yun}</font> 个订单未付款，是否继续充值！
		</div>
		<div class="">
			<a class="pay_tip_box_bth" href="index.php?c=paylog" >去付款</a>
			<a class="pay_tip_box_bth_jx" href="javascript:void(0);" onclick="layer.closeAll()">继续充值</a>
		</div>
	</div>         
</div>

<script>

	function comautointegral(){
		var proportion='{yun:}$config.integral_proportion{/yun}';
		var integral=parseInt($("#autointegral").val());
		if(integral){
			$("#user_vip_price").val(integral);
			$("#payintegral").html(integral);
			$(".payment_list_text").removeClass('payment_list_cur');
		}
	}
	$(document).ready(function(){
		"{yun:}if $nopayorder{/yun}"
			$.layer({
				type: 1,
				title: '付款提醒',
				closeBtn: [0, true],
				border: [10, 0.3, '#000', true],
				area: ['320px', '220px'],
				page: { dom: '#remind_order' }
			});
		"{yun:}/if{/yun}"
		var proportion='{yun:}$config.integral_proportion{/yun}';
		
		
		$("#autointegral").keyup(function(e) {
			if($(this).val()){
				var integralval=$(this).val();
				var discountarr=[];
				$("#integral").val(integralval);
				$("#user_vip_price").val(integralval);
				$("#payintegral").html(integralval);
			}else{
				$("#integral").val('0');
				$("#user_vip_price").val('0');
				$("#payintegral").html('0');
			}
		});
	});
</script> 
<input name='integral_min_recharge' value="{yun:}$config.integral_min_recharge{/yun}" type="hidden"/>
<script>
 	var second = 0;
	window.setInterval(function () {
		second ++;
	}, 1000);

	var url     = location.href, 
		refer   = document.referrer, 
		timeIn  = Math.ceil(new Date().getTime()/1000); 
	var opera   = 41; 
 	$(function(){ 
		setTimeout(function(){ 
			$.post('index.php?c=log',{url:url,refer:refer,timeIn:timeIn,second:2,opera:opera},function(data){
				if(data){
					$("#logid").val(data);
				}
			})
		},2000);
		
    }) 
	
	window.onbeforeunload = function(){ 
		var logid = $("#logid").val();
 		if(second>2){ 
			$.post('index.php?c=log&act=gxLog',{id:logid,second:second},function(data){
				if(data) {
					return false;
				}
			})
		}
   	}
</script>
{yun:}include file="$comstyle/footer.htm"{/yun}